home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d10
/
chrpro3.arc
/
MCONINIT.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-01-21
|
3KB
|
95 lines
* Program MCONINIT - Initializes the CONTRIB file for a new month
ERASE
If wknummax=15
Store 'Quarter' to XPER
else
Store 'Month ' to XPER
endif
@ 2,20 say 'CONTRIBUTIONS FILE INITIALIZE ROUTINE'
@ 5,6 SAY 'The following steps are about to be performed -'
@ 7,8 say '1. Entry of the dates of the Sundays of the up-coming '+XPER
@ 8,8 say '2. Renaming the CONTRIBX file to be called CONTRIB for continuing'
If CSA<>' '
@ 9,8 say '3. Renaming the CDIRFILX file to be called CDIRFILE (Special Funds)'
endif
?
Accept ' Ok? ' to XX
If !(XX)<>'Y'
Return
endif
STORE D+':CONTRIBX.DBF' TO NFILE
Store T to invalid
Select secondary
Use CDIRFILE index CDIRFILE
GOTO 4
Store $(spact,3,29) to newmo1
If wknummax=15
SKIP
Store $(spact,3,29) to newmo2
SKIP
Store $(spact,3,29) to newmo3
endif
Do while invalid
@ 14,0
@ 15,0 say ' Enter the dates of the Sundays of next '+XPER
@ 16,0
@ 17,10 say 'MO/W1 MO/W2 MO/W3 MO/W4 MO/W5'
@ 18,9 get newmo1
If wknummax=15
@ 19,10 say 'MO/W1 MO/W2 MO/W3 MO/W4 MO/W5'
@ 20,9 get newmo2
@ 21,10 SAY 'MO/W1 MO/W2 MO/W3 MO/W4 MO/W5'
@ 22,9 get newmo3
endif
READ
?
Accept ' Ok? ' to XX
If !(XX)='Q'
USE
RETURN
endif
If !(XX)='Y'
goto 4
Store F to invalid
replace spact with $(spact,1,2)+newmo1
If wknummax=15
SKIP
replace spact with $(spact,1,2)+newmo2
SKIP
replace spact with $(spact,1,2)+newmo3
endif
endif
enddo
USE
Select primary
Accept 'Now about to rename the CONTRIBX file to be CONTRIB. Ok? ' to XX
If !(XX)='Y'
Store d+':CONTRIB.DBF' to MFILE
IF FILE(NFILE)
If file(MFILE)
Delete file &MFILE
endif
Rename &NFILE to &MFILE
Accept ;
"The CONTRIB file is now set up for next period's entries. Press <retn>" to XX
ELSE
? 'File CONTRIBX does not exist. It has either not been created yet or has'
Accept 'already been renamed to CONTRIB. Press <retn> to exit ' to XX
endif
endif
Accept 'Now about to rename the CDIRFILX to be CDIRFILE (Special Funds) OK? ' ;
to xx
If !(XX)='Y'
If file(CDIRFILX)
If file(CDIRFILE)
delete file cdirfile
endif
rename cdirfilx to cdirfile
rename cdirfilx.ndx to cdirfile.ndx
else
Accept 'CDIRFILX file not found on the PROGRAM disk. Press <RETURN> ' to xx
endif
endif
Release XPER,newmo1,newmo2,newmo3,XFILE
RETURN
Y